class ApiConfig {
  static const dev = "https://gateway.devclx.cn";
  static const test = "http://api.tcmsl.cn";
  static const pre = "https://gateway.preclx.cn";
  static const prod = "https://gateway.91msl.com";

  static Env? env;

  static String get apiHost {
    switch (env) {
      case Env.dev: //开发环境
        return dev;
      case Env.test: //测试环境
        return test;
      case Env.pre: //预发布环境
        return pre;
      case Env.prod: //生产环境
        return prod;
      default: //默认是生产环境
        return prod;
    }
  }

  /// oss 路径
  static String get ossUrl {
    switch (env) {
      case null:
      case Env.dev:
      case Env.test:
      case Env.pre:
        return 'http://clx-dev.oss-cn-beijing.aliyuncs.com';
      case Env.prod:
        return 'http://clx-prod.oss-cn-beijing.aliyuncs.com';
    }
  }


}

enum Env {
  prod,
  pre,
  test,
  dev,
}
